package com.thoughtworks.tax.strategy;

import java.math.BigDecimal;

import com.thoughtworks.tax.Item;

/**
 * This calss define the caculated strategy of imported 
 * goods except food ,book,medical product
 * @author Tang Ling
 *
 */
public class ImportedAndNonSprecialGoodTaxStrategy extends SalesTaxStrategy
{

	/**
	 * if the good is imported and non-food,non-book,non-medical product
	 * its tax rate is sales tax rate add the imported tax rate
	 */
	protected BigDecimal caculdateTax(Item item)
	{
		BigDecimal taxRate = SALES_TAX.add(IMPORTED_TAX);
		BigDecimal result = item.getPrice().multiply(taxRate);
		return result.divide(DIV_FACROT);
	}

}
